class Watcher {
  // timer;
  constructor() {}
  start() {
    this.timer = setTimeout(this.timeAction.bind(this), this.intervalTime);
  }
  stop() {
    clearTimeout(this.timer);
  }

  timeAction() {
    clearTimeout(this.timer);
    this.onTime && this.onTime(this);
    this.timer = setTimeout(this.timeAction.bind(this), this.intervalTime);
  }
}

class WechatFastWatcher extends Watcher {
  constructor() {
    super();
    this.taskType = "wechatfast";
    this.intervalTime = 5000;
  }
}


exports.WechatFastWatcher = WechatFastWatcher
